~ chicken-core (master) /manual/Module (chicken eval)
Trap1[[tags: manual]]2[[toc:]]34== Module (chicken eval)56This module provides a handful of hooks that allow more fine-grained7control over how the standard procedure {{eval}} behaves.89=== Custom eval handlers1011==== eval-handler1213<parameter>(eval-handler)</parameter>1415A procedure of one or two arguments. When {{eval}} is invoked, it16calls the value of this parameter with the same arguments. The default17behavior is to evaluate the argument expression and to ignore the18second parameter.192021=== Using modules as evaluation environments2223==== module-environment2425<procedure>(module-environment MODULENAME)</procedure>2627Locates the module with the name {{MODULENAME}} and returns an28environment that can be passed as the second argument to {{eval}}. The29evaluated expressions have only access to the bindings that are30visible inside the module. Note that the environment is not mutable.3132If the module is not registered in the current process,33{{module-environment}} will try to locate meta-information about the34module by loading any existing import library with the name35{{MODULENAME.import.[scm|so]}}, if possible.3637In compiled modules, only exported bindings will be visible to38interactively entered code. In interpreted modules all bindings are39visible.4041---42Previous: [[Module (chicken errno)]]4344Next: [[Module (chicken file)]]